<template>
  <div>
    <v-header></v-header>
    <div>
    <div class="ris_cont">
      <!--左-->
      <div class="reg_left">
        <div class="ref_left_top">
          <p class=""></p>
          <span>登记列表</span>
        </div>
        <!--table页-->
        <ul class="table_page reg_tablePage">
          <li :class="registered?'':'table_page_active'" @click="registered=false"><img src="../../../static/img/register/jiantouBG_03.png"/>未登记</li>
          <li :class="registered?'table_page_active':''" @click="registered=true"><img src="../../../static/img/register/jiantouBG_03.png"/>已登记</li>
        </ul>
        <div class="reg_search">
          <table class="reg_search_table1">
            <tr>
              <td v-text="registered?'登记时间：':'开单时间：'"></td>
              <td><input type="date" v-model="begintime" max="9999-12-31"></td>
              <td>至</td>
              <td><input type="date" v-model="endtime" max="9999-12-31"></td>
            </tr>
            <tr>
              <td>设备类型：</td>
              <td colspan="3">
                <select class="reg_search_select1" v-model="eqptype">
                  <option :value="{code:'',name:''}"></option>
                  <option v-for="type in eqptypeList" :value="type">{{type.name}}</option>
                </select>
                <input type="text" class="reg_search_input1" placeholder="请输入申请单号/病历号/姓名/拼音码查询" v-model="searchText" @keyup.enter="search"/>
                <img src="../../../static/img/register/fdjSearch_07.png" class="fdj_search" @click="search" style="cursor: pointer"/>
              </td>
            </tr>
          </table>
        </div>
        <div>
          <table class=" line_height_32 reg_table_cont">
            <thead>
            <tr>
              <th>信息</th>
              <th>申请单号</th>
              <th>序号</th>
              <th>设备类型</th>
              <th v-text="registered?'登记时间':'开单时间'"></th>
              <th>收费项目</th>
            </tr>
            </thead>
          </table>
          <div class="table line_height_32 reg_table_cont_html scroll2" v-loading="loading">
            <table>
              <tbody>
              <tr v-for="pat in patInfoList" v-if="registered" @click="getPatInfoById(pat.id)" :style="pat.id==patient.id?{background: '#f3f3f3',cursor: 'pointer'}:{cursor: 'pointer'}">
                <td><span class="color_red" v-if="pat.emergstatus=='紧急'">[{{pattypefilter(pat.pattypecode)}}急]</span><span class="color_blur" v-else>[{{pattypefilter(pat.pattypecode)}}普]</span><span>{{pat.cname}}</span>
                {{pat.sex}}{{pat.age}}</td>
                <td>{{pat.applyno}}</td>
                <td>{{pat.queuenum}}</td>
                <td>{{pat.eqptypename}}</td>
                <td>{{pat.regtimeStr}}</td>
                <td :title="pat.feename">{{(pat.feename===undefined?'':pat.feename) | cut4}}</td>
              </tr>
              <tr v-for="pat in patBaseList" v-if="!registered" @dblclick="getPatBaseById(pat.id)" :style="pat.id==patient.baseid?{background: '#f3f3f3',cursor: 'pointer'}:{cursor: 'pointer'}">
                <td><span class="color_red" v-if="pat.emergstatus=='紧急'">[{{pat.pattype.substring(0,1)}}-急]</span><span class="color_blur" v-else>[{{pat.pattype.substring(0,1)}}-普]</span><span>&nbsp;{{pat.name}}</span>
                  &nbsp;&nbsp;{{pat.sex}}&nbsp;&nbsp;{{pat.age}}</td>
                <td>{{pat.applyno}}</td>
                <td></td>
                <td>{{pat.eqptypename}}</td>
                <td>{{pat.applytimeStr}}</td>
                <td :title="pat.feename">{{(pat.feename===undefined?'':pat.feename) | cut4}}</td>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
      <!--右-->
      <div class="reg_right">
        <div class="reg_right_head">人员详细登记表<span>影像号：{{patient.accessno}}</span></div>
        <div class="reg_right_list">
          <table class="reg_right_list_table line_height_30">
            <tr>
              <td>姓名<span class="color_red">*</span></td>
              <td>
              	<input type="text" v-model="patient.cname" class="input_width70" @blur="getPinyin" :readonly="!checkButton('reg_add')"/>
              	<!--别名-->
              	<input type="text" v-model="patient.ename" class="input_width30" :readonly="!checkButton('reg_add')"/>
              </td>
              <td>性别<span class="color_red">*</span></td>
              <td><select v-model="patient.sex">
                  <option></option>
                  <option>男</option>
                  <option>女</option>
                </select>
              </td>

              <td>年龄<span class="color_red">*</span></td>
              <td>
                <input type="text" class="reg_right_list_boxInput" v-model="patient.age"/>
                <select class="reg_right_list_boxSelect"  v-model="patient.ageunit">
                  <option>岁</option>
                  <option>月</option>
                  <option>周</option>
                  <option>天</option>
                </select>
              </td>
            </tr>
            <tr>

              <!--<td>联系电话</td>
              <td><input type="text" v-model="patient.tel"/></td>-->
              <!--<td>身份证号</td>
              <td><input type="text" v-model="patient.ssid"/></td>-->

              <td>开单时间</td>
              <td><input type="date" v-model="patient.applytimeStr" max="9999-12-31"/></td>
              <td>开单科室</td>
              <td>
                <select v-model="patient.applydeptcode">
                  <option value=""></option>
                  <option v-for="dept in deptList" :value="dept.code">{{dept.name}}</option>
                </select>
              </td>
              <td>开单医生</td>
              <td>
                <select v-model="patient.applydoccode">
                  <option value=""></option>
                  <option v-for="user in userList" :value="user.code">{{user.name}}</option>
                </select>
              </td>
            </tr>
            <tr>
              <!--<td>病区</td>
              <td><input type="text" v-model="patient.ward"/></td>-->
              <td>床号</td>
              <td><input type="text" v-model="patient.bednum"/></td>
              <td>住院日期</td>
              <td><input type="date" v-model="patient.inhostimeStr" max="9999-12-31"/></td>

              <td>病历号<span class="color_red">*</span></td>
              <td><input type="text" v-model="patient.pid"/></td>
            </tr>
            <tr>
              <!--<td>申请单号</td>-->
              <!--<td><input type="text" v-model="patient.applyno"/></td>
              <td>门诊号<span class="color_red">*</span></td>
              <td><input type="text" v-model="patient.clinicno"/></td>
              <td>住院号</td>
              <td><input type="text" v-model="patient.inhosno"/></td>-->

              <td>紧急程度</td>
              <td>
                  <select v-model="patient.emergstatus">
                    <option></option>
                    <option>紧急</option>
                    <option>普通</option>
                  </select>
              </td>

              <td>医嘱信息</td>
              <td><input type="text" v-model="patient.docadvice"/></td>
              <td>身份证号</td>
              <td><input type="text" v-model="patient.ssid"/></td>
            </tr>
            <!--<tr>-->
              <!--<td>住院次数</td>
              <td><input type="text" v-model="patient.times"/></td>-->
            <!--</tr>-->
          </table>
          <table class="reg_right_list_table line_height_30 reg_right_list_table2">
            <tr>
              <td>设备类型<span class="color_red">*</span></td>
              <td>
                <select v-model="patient.eqptypecode" @change="checkEqpType">
                  <option value=""></option>
                  <option v-for="type in eqptypeList" :value="type.code">{{type.name}}</option>
                </select>
              </td>
              <td>设备名称<span class="color_red">*</span></td>
              <td>
                <select v-model="patient.eqpcode">
                  <option value=""></option>
                  <option v-for="equip in equipList" :value="equip.code" v-if="equip.eqptypecode==patient.eqptypecode||patient.eqptypecode==''">{{equip.name}}</option>
                </select>
              </td>

              <td>内部编号</td>
              <td><input type="text" v-model="patient.customno"/></td>
            </tr>
            <tr>
              <td>登记时间</td>
              <td><input type="date" v-model="patient.regtimeStr" readonly max="9999-12-31"/></td>
              <td>预约时间</td>
              <td><input type="date" v-model="patient.ordertimeStr" max="9999-12-31"/></td>

              <td>患者类型</td>
              <td>
                <select v-model="patient.pattypecode">
                  <option value=""></option>
                  <option v-for="pattype in pattypeList" :value="pattype.code">{{pattype.name}}</option>
                </select>
              </td>
            </tr>
          </table>
          <table class="reg_right_list_table reg_right_list_table3 line_height_30">

            <tr>
              <td>临床诊断</td>
              <td>
                <input v-model="patient.diagnosis"/>
              </td>
            </tr>
          </table>
          <ul class="reg_r_t_list3 line_height_20 clear">
            <li>收费项目</li>
            <li>
              <ul class="scroll2 drop_down_menuUl1 ">
                <li v-for="(feeitem,index) in patient.feeitemList" :title="feeitem.name+(feeitem.feeprice ===undefined?'':('\r\n'+'价格：'+feeitem.feeprice))+(feeitem.feetime===undefined?'':('\r\n'+'收费时间：'+feeitem.feetimeStr))">{{feeitem.name | cut8}}<span @click="delFee(index)" class="reg_r_t_list_findClose">X</span></li>
              </ul>
              <!--输入文字可检索模态-->
              <div class="drop_down_menu drop_down_menu_sf1">
			            <input type="text" placeholder="输入检索信息" class="drop_down_menuUl1"/>
                  <!--<button class="menu_button">添加</button>-->
			            <ul class="top1 scroll2 drop_down_menuUl1 drop_down_menuUl1Modal drop_down_menuUl1_ul">
			            	<li v-for="(fee) in feeitemList" @click.stop="" @dblclick="addFee(fee)" :style="checkFeeitem(fee.code)?{background: '#f3f3f3 !important',cursor: 'inherit'}:{}"
                        v-if="fee.eqptypecode==patient.eqptypecode" :title="fee.name">{{fee.name | cut8}}<span style="display: none">{{fee.pycode}}</span></li>
                    <!--<li v-for="(fee) in feeitemList" @click.stop="" @dblclick="addFee(fee)" :code="fee.code" :style="checkFeeitem(fee.code)?{background: '#f3f3f3 !important',cursor: 'inherit'}:{}"-->
                        <!--v-if="fee.eqptypecode==patient.eqptypecode" :title="fee.name">{{fee.name | cut8}}<img src="../../../static/img/register/xuanzhong.png" class="boxImg" style="display: none;"><span style="display: none">{{fee.pycode}}</span></li>-->
			            </ul>
			        </div>
            </li>
            <li>部位</li>
            <li>
              <ul class="scroll2 drop_down_menuUl2 ">
                <li v-for="(part,index) in patient.partList" :title="part.name">{{part.name | cut8}}<span @click="delPart(index)"  class="reg_r_t_list_findClose">X</span></li>
              </ul>
              <!--输入文字可检索模态-->
              <div class="drop_down_menu">
			            <input type="text" v-model="partname" placeholder="输入检索信息" class="drop_down_menuUl2" @keyup.enter="addPart"/>
                  <!--<button class="menu_button">添加</button>-->
			            <!--<ul class="top1 scroll2 drop_down_menuUl2 drop_down_menuUl2Modal">
			            	<li v-for="(partgroup) in partgroupList">
                      <ul class="drop_down_menuUl2_ul">
                        <li v-for="(part) in partgroup.partList" @click.stop="" @dblclick="addPart(part)" :style="checkPart(part.code)?{background: '#f3f3f3 !important',cursor: 'inherit'}:{}"
                            v-if="part.eqptypecode==patient.eqptypecode" :title="part.name">{{part.name | cut8}}<span style="display: none">{{part.pycode}}</span></li>

                        &lt;!&ndash;<li v-for="(part) in partgroup.partList" @click.stop="" @dblclick="addPart(part)" :style="checkPart(part.code)?{background: '#f3f3f3 !important',cursor: 'inherit'}:{}"&ndash;&gt;
                            &lt;!&ndash;v-if="part.eqptypecode==patient.eqptypecode" :title="part.name">{{part.name | cut8}}<img src="../../../static/img/register/xuanzhong.png" class="boxImg1" style="display: none;"><span style="display: none">{{part.pycode}}</span></li>&ndash;&gt;

                      </ul>
                    </li>
			            </ul>-->
			        </div>
            </li>
          </ul>
        </div>


        <div class="reg_right_footBtn">
          <button class="button color_white btn_yellow btn_med" id="button_delete"  @click="deleteInfo" v-if="checkButton('reg_del')"><p>删除<img src="../../../static/img/register/delete.png"/></p></button>
          <button class="button color_white btn_green btn_med" @click="clear"  v-if="checkButton('reg_add')"><p>新增<img src="../../../static/img/register/newadd.png"/></p></button>
          <button class="button color_white btn_blur btn_med" id="button_preservation" @click="updatePatinfo" v-if="checkButton('reg_save')"><p>保存<img src="../../../static/img/register/preservation.png"/></p></button>
          <button class="button color_white bg_deepBlue btn_med" v-if="checkButton('reg_view')" style="width: 130px" @click="showmodal=true"><p>拍摄凭据<img src="../../../static/img/register/yuep.png"/></p></button>
          <button class="button color_white btn_the_green btn_med btn_dyzyd" v-if="registered && checkButton('reg_print_req')" @click="printGuideList(patient.id)"><p>打印申请单<img src="../../../static/img/reportview/dayin_16.png"/></p></button>
        </div>
      </div>
    </div>
  </div>
    <div class="high_shot_meter" v-show="showmodal">
      <div>
        <p class="hsm_title">仪器拍照
          <span @click="showmodal=false">X</span>
        </p>
        <!--左边的图片列表-->
        <div class="hsm_left">
          <ul class="scroll2" id="hsm_imgList">
            <!--<li>-->
            <!--<p>图一</p>-->
            <!--<img/>-->
            <!--</li>-->
            <!--<li>-->
            <!--<p>图二</p>-->
            <!--<img/>-->
            <!--</li>-->
            <li v-for="(evid,index) in patient.evids">
              <p class="imgText"></p>
              <img :src="evid | urlfilter">
              <span @click="delEvid(index)">X</span>
            </li>
            <!--<li>
              <p class="imgText">测试图</p>
              <img src="www.png">
            </li>-->
          </ul>
        </div>
        <!--右边的拍照和图片展示-->
        <div class="hsm_right">
          <!--显示区域-->
          <div class="hsm_r_img">
            <div class="booth">
              <video id="video" width="691" height="550"> 您的浏览器不支持 video 标签</video><br/>
              <button id='tack'class="button" @click="addEvid">拍照</button><br/>
              <canvas id='canvas' width='691' height='550'></canvas>
              <div id="pig_img">
                <img src='' class="pig_img_icon" id="pig_img_icon">
                <p class="pig_img_text">图片的名称</p>
                <span>X</span>
              </div>
            </div>
          </div>
          <!--操作区域-->
          <div class="hsm_r_operation">
            <button class="TurnLeft">左旋转</button>
            <button class="TurnRight">右旋转</button>
            <button class="amplification">放大</button>
            <button class="narrow">缩小</button>
          </div>
        </div>
      </div>
    </div>
  </div>

</template>

<script>
  import Header from '@/components/Header/Header'
  import { MessageBox,Notification } from 'element-ui'
  import {getButtonPermission} from '@/api/user';

    export default {
      components: {
        'v-header': Header
      },
      created () {

        getButtonPermission(this.buttonPermission).then(response => {
            this.buttons = response.data;
        })

       /* this.$http.get(window.localStorage.url+"/base/getEqptype")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.eqptypeList=res.data.data;
            }
          });



        this.$http.get(window.localStorage.url+"/base/getEquip")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.equipList=res.data.data;
            }
          });*/

        this.$http.get(window.localStorage.url+"/base/getDept")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.deptList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getDeptEqpEqptypeByActor")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.eqptypeList=res.data.eqptypeList;
              if(this.eqptypeList.length===1){
                this.eqptype=this.eqptypeList[0];
              }
              // this.deptList=res.data.deptList;
              this.equipList=res.data.equipList;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getPattype")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.pattypeList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getUser")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.userList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getFeeitem")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.feeitemList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getPartgroupPart")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.partgroupList=res.data.data;
            }
          });
      },
      data () {
        return {
          registered: false,
          loading:false,
          showmodal:false,
          searchText:'',
          eqptypeList:[],
          equipList:[],
          pattypeList:[],
          deptList:[],
          userList:[],
          feeitemList:[],
          partgroupList:[],
          selectfee:[],
          selectpart:[],
          searchFee:"",
          searchPart:"",
          eqptype:{code:'',name:''},
          begintime:this.formatday(new Date()),
          endtime:this.formatday(new Date()),
          patInfoList:[],
          patBaseList:[],
          partname:"",
          patient:{
            id:"",                                // 数据库主键
            cname:"",                              // 姓名
            sex:"",                               // 性别
            age:"",                               // 年龄
            ageunit:"岁",                           // 年龄单位
            ename:"",                             // 别名
            tel:"",                               // 联系电话
            ssid:"",                              // 身份证号
            applytimeStr:"",                         // 开单时间
            applydeptcode:"",                         // 开单科室
            applydoccode:"",                          // 开单医生
            ward:"",                              // 病区
            bednum:"",                            // 床号
            inhostimeStr:"",                         // 住院日期
            applyno:"",                           // 申请单号
            clinicno:"",                          // 门诊号
            inhosno:"",                           // 住院号
            times:"",                             // 住院次数
            emergstatus:"",                       // 紧急程度
            eqptypename:"",                       // 设备类型
            eqptypecode:"",                       // 设备类型
            eqpname:"",                           // 设备名称
            eqpcode:"",                           // 设备名称
            accessno:"",                          // 影像号
            customno:"",                          // 内部编号
            regtimeStr:"",                           // 登记时间
            ordertimeStr:"",                         // 预约时间
            pattypecode:"",                       // 患者类型
            docadvice:"",                         // 医嘱信息
            diagnosis:"",                         // 临床诊断
            notice:"",                            // 提示信息
            statuscode:"",                            // 提示信息
            pid:"",                            // 病例号
            recordno:"",                            // 档案号

            baseid:"",

            // 收费项目 部位
            feeitemList:[],
            partList:[],
            evids:[]

          },
          buttonPermission: 'reg',
          buttons: []
        }
      },
      methods: {
        checkEqpType() {
          /*this.patient.eqpcode='';
          setTimeout(function(){
            $('.drop_down_menuUl1_ul').children('li:first-child').children('img').show().parent().siblings('li').children('img').remove();
          },600)*/
          this.patient.eqpcode='';
          // console.log(2222222);
          var count=0;
          var j=0;
          for (var i in this.equipList){
            if(this.equipList[i].eqptypecode==this.patient.eqptypecode){
              j=i;
              count++;
              // console.log(count);
            }
          }
          if(count==1){
            this.patient.eqpcode=this.equipList[j].code;
          }
        },
        search () {
          if(this.registered){
            this.search3();
          }else {
            this.search4();
          }
        },
        search1 () {
          // console.log('1111')
          //patinfo
          this.loading=true;
          var eqptypecodes=[];
          for(var i in this.eqptypeList){
            eqptypecodes.push(this.eqptypeList[i].code);
          }

          this.$http.get(window.localStorage.url+"/pat/searchPatInfo?begintime="+this.begintime+"&endtime="+this.endtime+"&eqptypecode="+this.eqptype.code+"&searchText="+this.searchText+"&eqptypeList="+JSON.stringify(eqptypecodes))
            .then(function (res) {
              this.loading=false;
                if(res.data.status=='SUCCESS') {
                  this.patInfoList = res.data.data;
                  // this.getPatInfoById(res.data.data[0].id);

                  /*$pg.popup({
                    text:"查询成功",//显示的文本
  //          bgColor:"#f1f1f1", //背景皮肤
                    btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                    btnBgColor:'#4f56a3',//按钮的颜色
                    btnColor:'#fff',//按钮的字体颜色
                    btnToggle:{
                      btnDetermine:true,//确定按钮是否显示
                      btnCancel:false,//取消按钮是否显示
                    },
                    determine:function () {
                    }
                  });*/
                }else {
                  /*$pg.popup({
                    text:"查询失败",//显示的文本
  //          bgColor:"#f1f1f1", //背景皮肤
                    btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                    btnBgColor:'#4f56a3',//按钮的颜色
                    btnColor:'#fff',//按钮的字体颜色
                    btnToggle:{
                      btnDetermine:true,//确定按钮是否显示
                      btnCancel:false,//取消按钮是否显示
                    },
                    determine:function () {
                    }
                  });*/
                }
              }
            );
        },
        search2 () {
          this.loading=true;
          var eqptypecodes=[];
          for(var i in this.eqptypeList){
            eqptypecodes.push(this.eqptypeList[i].code);
          }
          // console.log(eqptypecodes);
          this.$http.get(window.localStorage.url+"/pat/searchPatBase?begintime="+this.begintime+"&endtime="+this.endtime+"&eqptypecode="+this.eqptype.code+"&searchText="+this.searchText+"&eqptypeList="+JSON.stringify(eqptypecodes))
            .then(function (res) {
              this.loading=false;
              if(res.data.status=='SUCCESS') {
                this.patBaseList = res.data.data;
                // this.getPatBaseById(res.data.data[0].id);
              }
              }
            );
        },
        search3 () {
          // console.log('1111')
          //patinfo
          this.loading=true;
          var eqptypecodes=[];
          for(var i in this.eqptypeList){
            eqptypecodes.push(this.eqptypeList[i].code);
          }

          this.$http.get(window.localStorage.url+"/pat/searchPatInfo?begintime="+this.begintime+"&endtime="+this.endtime+"&eqptypecode="+this.eqptype.code+"&searchText="+this.searchText+"&eqptypeList="+JSON.stringify(eqptypecodes))
            .then(function (res) {
              this.loading=false;
                if(res.data.status=='SUCCESS') {
                  this.patInfoList = res.data.data;
                  this.getPatInfoById(res.data.data[0].id);

                  /*$pg.popup({
                    text:"查询成功",//显示的文本
  //          bgColor:"#f1f1f1", //背景皮肤
                    btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                    btnBgColor:'#4f56a3',//按钮的颜色
                    btnColor:'#fff',//按钮的字体颜色
                    btnToggle:{
                      btnDetermine:true,//确定按钮是否显示
                      btnCancel:false,//取消按钮是否显示
                    },
                    determine:function () {
                    }
                  });*/
                }else {
                  /*$pg.popup({
                    text:"查询失败",//显示的文本
  //          bgColor:"#f1f1f1", //背景皮肤
                    btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                    btnBgColor:'#4f56a3',//按钮的颜色
                    btnColor:'#fff',//按钮的字体颜色
                    btnToggle:{
                      btnDetermine:true,//确定按钮是否显示
                      btnCancel:false,//取消按钮是否显示
                    },
                    determine:function () {
                    }
                  });*/
                }
              }
            );
        },
        search4 () {
          this.loading=true;
          var eqptypecodes=[];
          for(var i in this.eqptypeList){
            eqptypecodes.push(this.eqptypeList[i].code);
          }
          // console.log(eqptypecodes);
          this.$http.get(window.localStorage.url+"/pat/searchPatBase?begintime="+this.begintime+"&endtime="+this.endtime+"&eqptypecode="+this.eqptype.code+"&searchText="+this.searchText+"&eqptypeList="+JSON.stringify(eqptypecodes))
            .then(function (res) {
              this.loading=false;
              if(res.data.status=='SUCCESS') {
                this.patBaseList = res.data.data;
                this.getPatBaseById(res.data.data[0].id);
              }
              }
            );
        },
        getPatInfoById (id) {
          // console.log('2222')
          this.$http.get(window.localStorage.url+"/pat/getPatInfoById/"+id)
            .then(function (res) {
              if(res.data.status=='SUCCESS') {
                var patInfo=res.data.data;
                this.patient.id = patInfo.id===undefined?"":patInfo.id;
                this.patient.cname = patInfo.cname===undefined?"":patInfo.cname;
                this.patient.sex = patInfo.sex===undefined?"":patInfo.sex;
                this.patient.age = patInfo.age===undefined?"":patInfo.age;
                this.patient.ageunit = patInfo.ageunit===undefined?"":patInfo.ageunit;
                this.patient.ename = patInfo.ename===undefined?"":patInfo.ename;
                this.patient.tel = patInfo.tel===undefined?"":patInfo.tel;
                this.patient.ssid = patInfo.ssid===undefined?"":patInfo.ssid;
                this.patient.applytimeStr = patInfo.applytimeStr===undefined?"":patInfo.applytimeStr;
                this.patient.applydeptcode = patInfo.applydeptcode===undefined?"":patInfo.applydeptcode;
                this.patient.applydoccode = patInfo.applydoccode===undefined?"":patInfo.applydoccode;
                this.patient.ward = patInfo.ward===undefined?"":patInfo.ward;
                this.patient.bednum = patInfo.bednum===undefined?"":patInfo.bednum;
                this.patient.inhostimeStr = patInfo.inhostimeStr===undefined?"":patInfo.inhostimeStr;
                this.patient.applyno = patInfo.applyno===undefined?"":patInfo.applyno;
                this.patient.clinicno = patInfo.clinicno===undefined?"":patInfo.clinicno;
                this.patient.inhosno = patInfo.inhosno===undefined?"":patInfo.inhosno;
                this.patient.times = patInfo.times===undefined?"":patInfo.times;
                this.patient.emergstatus = patInfo.emergstatus===undefined?"":patInfo.emergstatus;
                this.patient.eqptypename = patInfo.eqptypename===undefined?"":patInfo.eqptypename;
                this.patient.eqptypecode = patInfo.eqptypecode===undefined?"":patInfo.eqptypecode;
                this.patient.eqpname = patInfo.eqpname===undefined?"":patInfo.eqpname;
                this.patient.eqpcode = patInfo.eqpcode===undefined?"":patInfo.eqpcode;
                this.patient.accessno = patInfo.accessno===undefined?"":patInfo.accessno;
                this.patient.customno = patInfo.customno===undefined?"":patInfo.customno;
                this.patient.regtimeStr = patInfo.regtimeStr===undefined?"":patInfo.regtimeStr;
                this.patient.ordertimeStr = patInfo.ordertimeStr===undefined?"":patInfo.ordertimeStr;
                this.patient.pattypecode = patInfo.pattypecode===undefined?"":patInfo.pattypecode;
                this.patient.docadvice = patInfo.docadvice===undefined?"":patInfo.docadvice;
                this.patient.diagnosis = patInfo.diagnosis===undefined?"":patInfo.diagnosis;
                this.patient.notice = patInfo.notice===undefined?"":patInfo.notice;
                this.patient.statuscode = patInfo.statuscode===undefined?"":patInfo.statuscode;
                this.patient.pid = patInfo.pid===undefined?"":patInfo.pid;
                this.patient.recordno = patInfo.recordno===undefined?"":patInfo.recordno;

                this.patient.baseid = "";

                this.patient.feeitemList = patInfo.feeitemList===undefined?[]:patInfo.feeitemList;
                this.patient.partList = patInfo.partList===undefined?[]:patInfo.partList;

                this.patient.evids = res.data.evids===undefined?[]:res.data.evids;

                // this.checkEqpType();
              }
              }
            );
        },
        getPatBaseById (id) {
          // console.log('2222')
          this.$http.get(window.localStorage.url+"/pat/getPatBaseById/"+id)
            .then(function (res) {
              if(res.data.status=='SUCCESS') {
                var patBase=res.data.data;
                this.patient.id = "";
                this.patient.cname = patBase.name===undefined?"":patBase.name;
                this.patient.sex = patBase.sex===undefined?"":patBase.sex;
                this.patient.age = patBase.age===undefined?"":patBase.age;
                this.patient.ageunit = patBase.ageunit===undefined?"":patBase.ageunit;
                this.patient.ename = patBase.ename===undefined?"":patBase.ename;
                this.patient.tel = patBase.tel===undefined?"":patBase.tel;
                this.patient.ssid = patBase.ssid===undefined?"":patBase.ssid;
                this.patient.applytimeStr = patBase.applytimeStr===undefined?"":patBase.applytimeStr;
                this.patient.applydeptcode = patBase.applydeptcode===undefined?"":patBase.applydeptcode;
                this.patient.applydoccode = patBase.applydoccode===undefined?"":patBase.applydoccode;
                this.patient.ward = patBase.ward===undefined?"":patBase.ward;
                this.patient.bednum = patBase.bednum===undefined?"":patBase.bednum;
                this.patient.inhostimeStr = patBase.inhostimeStr===undefined?"":patBase.inhostimeStr;
                this.patient.applyno = patBase.applyno===undefined?"":patBase.applyno;
                this.patient.clinicno = patBase.clinicno===undefined?"":patBase.clinicno;
                this.patient.inhosno = patBase.inhosno===undefined?"":patBase.inhosno;
                this.patient.times = patBase.times===undefined?"":patBase.times;
                this.patient.emergstatus = patBase.emergstatus===undefined?"":patBase.emergstatus;
                this.patient.eqptypename = patBase.eqptype===undefined?"":patBase.eqptype;
                this.patient.eqptypecode = patBase.eqptypecode===undefined?"":patBase.eqptypecode;
                this.patient.eqpname = patBase.eqpname===undefined?"":patBase.eqpname;
                this.patient.eqpcode = patBase.eqpcode===undefined?"":patBase.eqpcode;
                this.patient.accessno = patBase.accessno===undefined?"":patBase.accessno;
                this.patient.customno = patBase.customno===undefined?"":patBase.customno;
                this.patient.regtimeStr = patBase.regtimeStr===undefined?"":patBase.regtimeStr;
                this.patient.ordertimeStr = patBase.ordertimeStr===undefined?this.formatday(new Date()):patBase.ordertimeStr;
                this.patient.pattypecode = patBase.pattypecode===undefined?"":patBase.pattypecode;
                this.patient.docadvice = patBase.docadvice===undefined?"":patBase.docadvice;
                this.patient.diagnosis = patBase.diagnosis===undefined?"":patBase.diagnosis;
                this.patient.notice = patBase.notice===undefined?"":patBase.notice;
                this.patient.statuscode = patBase.statuscode===undefined?"":patBase.statuscode;
                this.patient.pid = patBase.pid===undefined?"":patBase.pid;
                this.patient.recordno = patBase.recordno===undefined?"":patBase.recordno;


                this.patient.feeitemList = patBase.feeitemList===undefined?[]:patBase.feeitemList;
                this.patient.partList = patBase.partList===undefined?[]:patBase.partList;
                this.patient.evids = [];

                this.patient.baseid = patBase.id===undefined?"":patBase.id;

                this.getPinyin();
                this.checkEqpType();
                $('.drop_down_menuUl2').focus();
              }
              }
            );
        },
        updatePatinfo(){

          var that=this;

          if(that.patient.cname==""){
            /*$pg.popup({
              text:"姓名不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*/
            this.$notify.error({
              title: '保存失败',
              message: '姓名不能为空',
              duration: 3000,
              offset: 35
            });
            return false;
          }
          if(that.patient.sex==""){
            /*$pg.popup({
              text:"性别不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*/
            this.$notify.error({
              title: '保存失败',
              message: '性别不能为空',
              duration: 3000,
              offset: 35
            });
            return false;
          }
          if(that.patient.age==""){
            /*$pg.popup({
              text:"年龄不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*/
            this.$notify.error({
              title: '保存失败',
              message: '年龄不能为空',
              duration: 3000,
              offset: 35
            });
            return false;
          }
          if(that.patient.ename==""){
            /*$pg.popup({
              text:"别名不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*/
            this.$notify.error({
              title: '保存失败',
              message: '别名不能为空',
              duration: 3000,
              offset: 100
            });
            return false;
          }
         /* if(that.patient.clinicno==""){
           /!* $pg.popup({
              text:"门诊号不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*!/
            this.$notify.error({
              title: '保存失败',
              message: '门诊号不能为空',
              duration: 3000,
          offset: 100
            });
            return false;
          }*/
          if(that.patient.pid==""){
           /* $pg.popup({
              text:"门诊号不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*/
            this.$notify.error({
              title: '保存失败',
              message: '病例号不能为空',
              duration: 3000,
          offset: 100
            });
            return false;
          }
          if(that.patient.eqptypecode==""){
            /*$pg.popup({
              text:"设备类型不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*/
            this.$notify.error({
              title: '保存失败',
              message: '设备类型不能为空',
              duration: 3000,
              offset: 35
            });
            return false;
          }
          if(that.patient.eqpcode==""){
            /*$pg.popup({
              text:"设备不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*/
            this.$notify.error({
              title: '保存失败',
              message: '设备不能为空',
              duration: 3000,
              offset: 35
            });
            return false;
          }
          /*if(that.patient.accessno==""){
           /!* $pg.popup({
              text:"影像号不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });*!/
            this.$notify.error({
              title: '保存失败',
              message: '影像号不能为空',
              duration: 3000,
              offset: 35
            });
            return false;
          }*/
          if(that.patient.ordertimeStr==""){
            /*this.$notify.error({
              title: '保存失败',
              message: '预约时间不能为空',
              duration: 3000,
              offset: 35
            });
            return false;*/
            that.patient.ordertimeStr=this.formatday(new Date());
          }
          if(that.patient.feeitemList.length>0){
            for(var i in that.patient.feeitemList){
              if(that.patient.feeitemList[i].eqptypecode!=that.patient.eqptypecode){
                this.$notify.error({
                  title: '保存失败',
                  message: '收费项目、设备类型不匹配',
                  duration: 3000,
                  offset: 35
                });
                return false;
              }
            }
          } else if(that.patient.baseid!=""){
            this.$notify.error({
              title: '保存失败',
              message: '收费项目不能为空',
              duration: 3000,
              offset: 35
            });
            return false;
          }


         if(that.patient.partList.length>0){
            /*for(var i in that.patient.partList){
              if(that.patient.partList[i].eqptypecode!=that.patient.eqptypecode){
                this.$notify.error({
                  title: '保存失败',
                  message: '部位、设备类型不匹配',
                  duration: 3000,
                  offset: 35
                });
                return false;
              }
            }*/
         } else {
           this.$notify.error({
             title: '保存失败',
             message: '部位不能为空',
             duration: 3000,
             offset: 35
           });
           return false;
         }



          for(var i in that.equipList){
            if(that.patient.eqpcode==that.equipList[i].code){
              that.patient.eqpname=that.equipList[i].name;
              // console.log(this.equipList[i].name);
            }
          }

          for(var j in that.eqptypeList){
            if(that.patient.eqptypecode==that.eqptypeList[j].code){
              that.patient.eqptypename=that.eqptypeList[j].name;
            }
          }


          that.$http.post(window.localStorage.url+"/pat/updatePatInfo",that.patient).then(function (response) {
            console.log(response)
            if(response.data.status=="SUCCESS"){

              that.search1();
              that.search2();

              if(that.patient.id!=''&&that.patient.id!=undefined){
                this.$notify({
                  title: '成功',
                  message: '保存成功',
                  duration: 2000,
                  offset: 35,
                  type: 'success'
                });
                that.getPatInfoById(that.patient.id);
              } else {

                this.$confirm('保存成功，是否打印申请单(影像号:'+ response.data.accessno +')?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning'
                }).then(() => {
                  that.printGuideList(response.data.data);
                }).catch(() => {
                  /*this.$message({
                    type: 'info',
                    message: '已取消删除'
                  });*/
                  this.$notify.info({
                    title: '取消',
                    message: '已取消',
                    duration: 3000,
                    offset: 35
                  });
                });
                that.clear();
              }



              /*$pg.popup({
                text:"保存成功",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
                btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                btnBgColor:'#4f56a3',//按钮的颜色
                btnColor:'#fff',//按钮的字体颜色
                btnToggle:{
                  btnDetermine:true,//确定按钮是否显示
                  btnCancel:false,//取消按钮是否显示
                },
                determine:function () {
                  that.search1();
                  that.search2();
                  that.clear();
                }
              });*/
            }else {
              this.$notify.error({
                title: '失败',
                message: response.data.message,
                duration: 3000,
                offset: 35
              });

             /* $pg.popup({
                text:response.data.message,//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
                btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                btnBgColor:'#4f56a3',//按钮的颜色
                btnColor:'#fff',//按钮的字体颜色
                // height:'200',
                btnToggle:{
                  btnDetermine:true,//确定按钮是否显示
                  btnCancel:false,//取消按钮是否显示
                },
                determine:function () {
                }
              });*/
            }
          })
        },
        clear(){
          this.patient={
            id:"",                                // 数据库主键
            cname:"",                              // 姓名
            sex:"",                               // 性别
            age:"",                               // 年龄
            ageunit:"岁",                           // 年龄单位
            ename:"",                             // 别名
            tel:"",                               // 联系电话
            ssid:"",                              // 身份证号
            applytimeStr:"",                         // 开单时间
            applydeptcode:"",                         // 开单科室
            applydoccode:"",                          // 开单医生
            ward:"",                              // 病区
            bednum:"",                            // 床号
            inhostimeStr:"",                         // 住院日期
            applyno:"",                           // 申请单号
            clinicno:"",                          // 门诊号
            inhosno:"",                           // 住院号
            times:"",                             // 住院次数
            emergstatus:"",                       // 紧急程度
            eqptypename:"",                       // 设备类型
            eqptypecode:"",                       // 设备类型
            eqpname:"",                           // 设备名称
            eqpcode:"",                           // 设备名称
            accessno:"",                          // 影像号
            customno:"",                          // 内部编号
            regtimeStr:"",                           // 登记时间
            ordertimeStr:this.formatday(new Date()),                         // 预约时间
            pattypecode:"",                       // 患者类型
            docadvice:"",                         // 医嘱信息
            diagnosis:"",                         // 临床诊断
            notice:"",                            // 提示信息
            statuscode:"",                            // 提示信息
            pid:"",                            // 病历号
            recordno:"",                            // 档案号

            baseid:"",

            // 收费项目 部位
            feeitemList:[],
            partList:[],
            evids:[],
            fee:{}
          };
        },
        checkPart (code){
          // for(var i in this.patient.partList){
          for(var i in this.patient.partList){
            // if(this.patient.partList[i].code==code){
            if(this.patient.partList[i].code==code){
              return true;
            }
          }
          return false;
        },
        checkPartgroup (index){
          // for(var i in this.patient.partList){
          // var flag=false;
          for(var i in this.partgroupList[index].partList){
            if(this.partgroupList[index].partList[i].name.indexOf(this.searchPart)>=0){
              return true;
            }
          }
          return false;
        },
        checkFeeitem (code){
          // for(var i in this.patient.feeitemList){
          for(var i in this.patient.feeitemList){
            // if(this.patient.feeitemList[i].code==code){
            if(this.patient.feeitemList[i].code==code){
              return true;
            }
          }
          return false;
        },
        addFee(fee){
          if(!this.checkFeeitem(fee.code)) {
            // this.patient.feeitemList.splice(this.patient.feeitemList.length, 0, fee);
            this.patient.feeitemList.splice(this.patient.feeitemList.length, 0, fee);
          }
        },
        delFee(index){
          // this.patient.feeitemList.splice(index,1);
          this.patient.feeitemList.splice(index,1);
        },
        addPart(part){
          /*if(!this.checkPart(part.code)) {
            // this.patient.partList.splice(this.patient.partList.length, 0, part);
            this.patient.partList.splice(this.patient.partList.length, 0, part);
          }*/
          this.patient.partList.splice(this.patient.partList.length, 0, {name: this.partname});
          this.partname='';
        },
        delPart(index){
          // this.patient.partList.splice(index,1);
          this.patient.partList.splice(index,1);
        },
        deleteInfo(){
          var id=this.patient.id;
          var that=this;
          if(id==""){
            this.$notify.error({
              title: '失败',
              message: '此人为未登记状态',
              duration: 3000,
              offset: 35
            });
          }else {
            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            }).then(() => {
              that.$http.get(window.localStorage.url + "/pat/deletePatInfoById/" + id)
                .then(function (res) {
                  if (res.data.status == "SUCCESS") {
                    this.$notify({
                      title: '成功',
                      message: '删除成功',
                      duration: 3000,
                      offset: 35,
                      type: 'success'
                    });
                    that.search1();
                    that.search2();
                    that.clear();
                  }else{
                    this.$notify.error({
                      title: '失败',
                      message: res.data.message,
                      duration: 3000,
                      offset: 35
                    });
                  }
                });

            }).catch(() => {
              this.$notify.info({
                title: '取消',
                message: '删除已取消',
                duration: 3000,
                offset: 35
              });
            });
          }
        },
        yes(){
          // this.patient.partList=this.selectpart;
          // this.patient.feeitemList=this.selectfee;

          this.patient.feeitemList=[];
          for(var i in this.selectfee){
            this.patient.feeitemList[i]=this.selectfee[i];
          }

          this.patient.partList=[];
          for(var i in this.selectpart){
            this.patient.partList[i]=this.selectpart[i];
          }

          $('.reg_r_btn_modal').hide();
          $('.reg_r_btn_modal_cont').animate({
            width:'0',
            height:'0',
            opacity:'0'
          },200);
        },
        load(){
          // this.showModal=true;
          this.selectfee=[];
          for(var i in this.patient.feeitemList){
            this.selectfee[i]=this.patient.feeitemList[i];
          }
          // this.selectfee=this.patient.feeitemList;
          // this.selectpart=this.patient.partList;
          this.selectpart=[];
          for(var i in this.patient.partList){
            this.selectpart[i]=this.patient.partList[i];
          }
        },
        formatday(date) {
          var seperator1 = "-";
          var month = date.getMonth() + 1;
          var strDate = date.getDate();
          if (month >= 1 && month <= 9) {
            month = "0" + month;
          }
          if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
          }
          var dateStr = date.getFullYear() + seperator1 + month + seperator1 + strDate
          return dateStr;
        },
        getPinyin(){
          this.$http.get(window.localStorage.url + "/pytool/getQuanPin?name=" + this.patient.cname)
            .then(function (response) {
            if(response.data.status=='SUCCESS'){
              this.patient.ename=response.data.data;
            }
          })
        },
        checkButton(code) {
          for(var i in this.buttons){
            if (code == this.buttons[i]) {
              return true;
            }
          }
          return false;
        },
        pattypefilter(pattypecode){
          // console.log(str);
          var pattypename='';
          for(var i in this.pattypeList){
            if(this.pattypeList[i].code==pattypecode){
              pattypename=this.pattypeList[i].name.substring(0,1)+'-';
            }
          }
          // console.log(str);
          return pattypename;
        },
        printGuideList(infoId) {
          if (infoId != undefined) {
            this.$http.get(window.localStorage.url + "/print/rptAll?pids=" + infoId + "&rptName=申请单&type=申请单&actionname=PRINT&areacode=1").then(res => {
              if(res.data.status=='SUCCESS'){
                console.log(res.data.data);
                res.data.data.UPLOADFILEADDR=window.localStorage.url+res.data.data.UPLOADFILEADDR;
                res.data.data.SAVEFILEADDR=window.localStorage.url+res.data.data.SAVEFILEADDR;
                this.$http.post(res.data.url ,JSON.stringify(res.data.data),{headers: {
                      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
                    },credentials:false}).then(response => {
                      // console.log(1111111);
                  if(response.data.STATUS=='OK'){
                    this.$notify({
                      title: '成功',
                      message: '打印成功',
                      duration: 3000,
                      offset: 35,
                      type: 'success'
                    });
                    // this.$http.get(window.localStorage.url + "/print/savePrintResult?result=" + encodeURIComponent(JSON.stringify(response.data)) + "&pids=" + infoId)
                  }else{
                    this.$notify.error({
                      title: '失败',
                      message: '打印失败',
                      duration: 3000,
                      offset: 35
                    });
                  }
                })
              }
            })
          }
        },
        delEvid (index) {
          this.patient.evids.splice(index,1);
        },
        addEvid () {
          this.$http.post("http://127.0.0.1:50000/video?dataType=text" ,JSON.stringify({"AppName":"WebRis","actionName":"video"
            ,"data":window.localStorage.url+ "/BaseSysUser/uploadFile/patimage"}),{headers: {
              'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
            },credentials:false}).then(response=>  {

            if(response.data.status=="SUCCESS")
            {
              this.patient.evids.splice(this.patient.evids.length,0,response.data.data);
            } else {
              this.$notify.error({
                title: '失败',
                message: '拍摄失败',
                duration: 3000,
                offset: 35
              });
            }
          })
        }
      },
      mounted(){
        // var that = this;
        //
        // var jtJp={
        //   init:function () {
        //     this.keyboard();
        //   },
        //   keyboard:function () {
        //     var _this=jtJp;
        //     document.onkeydown= function (e) {
        //
        //       // if($('.drop_down_menuUl1_ul').is(':hidden')==false){
        //         //根据按键调用与之对应的方法   第一个
        //         switch (e.keyCode){
        //           //            case 37: this.moveLeft();break;
        //           case 38: _this.moveTop({boxImg:$('.boxImg'),ul:'.drop_down_menuUl1_ul'});break;//上
        //           //            case 39: this.moveRight();break;
        //           case 40: _this.moveBottom({boxImg:$('.boxImg'),ul:'.drop_down_menuUl1_ul'});break;//下
        //           case 13: _this.enter({boxImg:$('.boxImg'),ul:'.drop_down_menuUl1_ul'})
        //         }
        //       // }else {
        //       //   //根据按键调用与之对应的方法   第二个
        //       //   switch (e.keyCode){
        //       //     //            case 37: this.moveLeft();break;
        //       //     case 38: _this.moveTop({boxImg:$('.boxImg1'),ul:'.drop_down_menuUl2Modal'});break;//上
        //       //     //            case 39: this.moveRight();break;
        //       //     case 40: _this.moveBottom({boxImg:$('.boxImg1'),ul:'.drop_down_menuUl2Modal'});break;//下
        //       //     case 13: _this.enter({boxImg:$('.boxImg1'),ul:'.drop_down_menuUl2Modal'})
        //       //   }
        //       // }
        //
        //
        //
        //
        //
        //
        //
        //     }//this为game对象，把该对象绑定成game对象
        //   },
        //   //键盘上按钮执行的方法
        //   moveTop:function (obj) {
        //     if($(obj.ul).is(":hidden")==false) {
        //       obj.boxImg.parents(obj.ul).children('li').each(function () {
        //         var index = $(this).children('img').length;
        //         // console.log(index)
        //         if (index > 0) {
        //           if ($(this).index() == 0) {
        //             return false;
        //           } else {
        //             var html = obj.boxImg.get(0).outerHTML;
        //             obj.boxImg.parent().prev().append(html);
        //             obj.boxImg[0].remove();
        //           }
        //         }
        //       })
        //     }
        //   },
        //   //键盘下按键执行的方法
        //   moveBottom:function (obj) {
        //     if($(obj.ul).is(":hidden")==false) {
        //       obj.boxImg.parents(obj.ul).children('li').each(function () {
        //         var index = $(this).children('img').length;
        //         var len = $('.ul').children().length - 1;
        //         if (index > 0) {
        //           if ($(this).index() == len) {
        //             return false;
        //           } else {
        //             var html = obj.boxImg.get(0).outerHTML;
        //             obj.boxImg.parent().next().append(html);
        //             obj.boxImg[0].remove();
        //           }
        //         }
        //       })
        //     }
        //   },
        //   //回车键
        //   enter:function (obj) {
        //     obj.boxImg.parents(obj.ul).children('li').each(function () {
        //       var index=$(this).children('img').length;
        //       if(index>0){
        //         for(var i in that.feeitemList){
        //           if($(this).attr('code')==that.feeitemList[i].code){
        //             // console.log(that.feeitemList[i])
        //             that.addFee(that.feeitemList[i])
        //           }
        //         }
        //       }
        //     })
        //   }
        //
        //   // enter:function (obj) {
        //   //   obj.boxImg.parents(obj.ul).children('li').each(function () {
        //   //     var index=$(this).children('img').length;
        //   //     if(index>0){
        //   //       // that.addFee($(this).attr('code'))
        //   //       // console.log();
        //   //       that.addFee(that.fee);
        //   //
        //   //     }
        //   //   })
        //   // }
        // }
        // jtJp.init();


        $pg.drop_down_menu('.drop_down_menu');

        var that=this;
        function height() {
          var winHeight = $(window).height();
          winHeight = (winHeight - 677) / 0.83;
          winHeight = winHeight < 0 ? 0 : winHeight;
          // console.log(winHeight);
          $('.reg_table_cont_html ').css({
            height:(300+winHeight)+'px',
          });
          var bili=winHeight/8;
          $('.reg_right_list_table tr').css({
            // padding:'0 '+(bili/2+10)+'px',
            height:(bili+42)+'px',
          })

        }

        window.onresize = function(){
          height();
        };
        height();
/*        window.onresize = function(){
          height();
        };*/
        $('body').bind("click",function(e){
          var target = $(e.target);
          // if(target.closest(_this.pgel).children('input').length == 0&&target.closest(_this.pgel).children('ul').length == 0){
          if(target.closest('.drop_down_menuUl1').length == 0){
            $('.drop_down_menuUl1Modal').hide();
          }
          if(target.closest('.drop_down_menuUl2').length == 0){
            $('.drop_down_menuUl2Modal').hide();
          }
        });

        // 项目部位按钮
        $('#projectSite').click(function () {
          // that.load();
          $('.reg_r_btn_modal').show();
          $('.reg_r_btn_modal_cont').animate({
            width:'800px',
            height:'470px',
            opacity:'1'
          },200);
        })
        //项目部位里面的取消按钮
        $('#projectSiteCancel').click(function () {
          $('.reg_r_btn_modal').hide();
          $('.reg_r_btn_modal_cont').animate({
            width:'0',
            height:'0',
            opacity:'0'
          },200);
        })

        $(".reg_right_btn").bind("click",function(e){
          if( $('.reg_r_btn_modal').is(':hidden')){
            return false;
          }else {
            var target = $(e.target);
            if (target.closest(".reg_r_btn_modal_cont").length == 0 && target.closest("#projectSite").length == 0) {
              $('.reg_r_btn_modal').hide();
              $('.reg_r_btn_modal_cont').animate({
                width: '0',
                height: '0',
                opacity: '0'
              }, 200);
            }
          }
        });




        $('body').on('keyup',function (e) {
          var keyCode = e.keyCode || e.which || e.charCode;
          var ctrlKey = e.ctrlKey || e.metaKey;
          if(ctrlKey && keyCode == 83) {
            that.updatePatinfo();
            e.preventDefault();
          }
        });

        $('body').on('keydown',function (e) {
          var keyCode = e.keyCode || e.which || e.charCode;
          var ctrlKey = e.ctrlKey || e.metaKey;
          if(ctrlKey && keyCode == 83) {
            // that.updatePatinfo();
            e.preventDefault();
          }
        });


        (function () {
          var imaP={
            init:function () {
              var video = document.getElementById('video'),
                canvas = document.getElementById('canvas'),
                // snap = document.getElementById('tack'),
                img = document.getElementById('img'),
                vendorUrl = window.URL || window.webkitURL,
                i=0,
                deg=0,
                ii=1,
                yy=1,
                imgWidth=610,
                imgHeight=480;

              //获取初始的位置   保留值 还原
              var oldLeft=$('.pig_img_icon').css('left');
              var oldtop=$('.pig_img_icon').css('top');

              var max=function(w,h){
                  ii=ii+0.11;
                  yy=yy+0.11;
                  if(ii>2){
                    ii=2;
                  }
                  if(yy>2){
                    yy=2;
                  }
                  var newWidth=w*ii;
                  var newHeight=h*yy;
                  $('.pig_img_icon').css({
                    width:newWidth+'px',
                    height:newHeight+'px',
                  })
                },
                min=function (w,h) {
                  ii=ii-0.11;
                  yy=yy-0.11;
                  if(ii<1){
                    ii=1;
                  }
                  if(yy<1){
                    yy=1;
                  }
                  var newWidth=w*ii;
                  var newHeight=h*yy;
                  //缩小到原始大小的时候恢复原位
                  if(ii==1||yy==1){
                    $('.pig_img_icon').css({
                      left:oldLeft,
                      top:oldtop,
                    })
                  }
                  $('.pig_img_icon').css({
                    width:newWidth+'px',
                    height:newHeight+'px',
                  })
                },
                //得出前端放大或者缩小时候的原始状态
                xzjg=function () {
                  if((deg/90)%2==0){
                    imgWidth=610;
                    imgHeight=480;
                  }else {
                    imgWidth=480;
                    imgHeight=366;
                  }
                }

              //禁止图片拖动
              document.getElementById('pig_img_icon').onmousedown = function(e){
                e.preventDefault()
              };

              //图片的拖动处理
              $('#pig_img_icon').mousedown(function (event) {
                if(ii==1||yy==1){
                  return false;
                }
                var isMove = true;
                var down={
                  x:event.pageX,
                  y:event.pageY,
                }

                var obj = $('.pig_img_icon');
                var left=parseInt(obj.css('left'));
                var top=parseInt(obj.css('top'));
                $(document).mousemove(function (event) {
                    if(isMove == false){return false;}
                    var newX=down.x-event.pageX;
                    var newY=down.y-event.pageY;
                    var Newleft=left-newX;
                    var Newtop=top-newY;
                    if (isMove) {
                      obj.css({
                        left:Newleft,
                        top:Newtop,
                      });
                    }
                  }
                ).mouseup(
                  function () {
                    isMove = false;
                  }
                );
              });
              //提示弹窗
              function modalText(text) {
                $pg.popup({
                  text:text,//显示的文本
                  bgColor:"#f5f5f5", //背景皮肤
                  btnClass:'reBtn',//确定按钮的类值  必传
                  bgOpacity:'0',//大背景的透明度
                  btnBgColor:'#4f94cd',//按钮的颜色
                  btnToggle:{
                    btnDetermine:true,//确定按钮是否显示
                    btnCancel:false,//取消按钮是否显示
                  },
                  btnColor:'#fff',//按钮的字体颜色
                  determine:function(){},//确定按钮执行的方法
                  timeOut:0.8,//定时关闭  true为不关闭  或者不设置为不关闭
                });
              }

              //图片的复原原位
              var img={
                fuyuan:function () {
//复原图片
                  ii=1,yy=1;
                  $('#pig_img>img').animate({
                    width:'610px',
                    height:'480px',
                    marginLeft:'-305px',
                    marginTop:'-240px',
                    left:'50%',
                    top:'50%'
                  },100)
                },
                xuanzhuan:function () {
                  //旋转后图片的样式
                  ii=1,yy=1;
                  $('#pig_img>img').animate({
                    width:'480px',
                    height:'366px',
                    marginLeft:'-240px',
                    marginTop:'-183px',
                    left:'50%',
                    top:'50%'
                  },100)
                }
              }


              /*//媒体对象
              navigator.getMedia = navigator.getUserMedia ||
                navigator.webkitGetUserMedia ||
                navigator.mozGetUserMedia ||
                navigator.msGetUserMedia;
              navigator.getMedia({
                video: true, //使用摄像头对象
                audio: false  //不适用音频
              }, function(strem){
                video.src = vendorUrl.createObjectURL(strem);
                video.play();
              }, function(error) {
                //error.code
                alert("未知的错误！");
              });
              snap.addEventListener('click', function(){ i++;
                var liImgHtml="<li>" +
                  "<p class='imgText'>图&nbsp;&nbsp;"+i+"</p>" +
                  "<img class='img"+ i+"'/>" +
                  "<span>X</span>" +
                  "</li>";
//        return liImgHtml;
                $('#hsm_imgList').append(liImgHtml);
                //绘制canvas图形
                canvas.getContext('2d').drawImage(video, 0, 0, 691, 550);

                //把canvas图像转为img图片
                $(".img"+i).attr('src',canvas.toDataURL("image/png"));
              })*/


//    鼠标移入显示删除    对图片的各种操作
              $('#hsm_imgList').on('mousemove','li',function () {
                $(this).children('span').show();
              }).on('mouseout','li',function () {
                $(this).children('span').hide();
              })/*.on('click','span',function () {
                var _this=this;
                $pg.popup({
                  text:"确定删除吗？",//显示的文本
                  bgColor:"#f5f5f5", //背景皮肤
                  btnClass:'reBtn',//确定按钮的类值  必传
                  btnBgColor:'#4f94cd',//按钮的颜色
                  btnToggle:{
                    btnDetermine:true,//确定按钮是否显示
                    btnCancel:true,//取消按钮是否显示
                  },
                  btnColor:'#fff',//按钮的字体颜色
                  determine:function(){
                    $(_this).parent('li').remove();
                    //关闭右边打开的模态
                    $('#pig_img').hide();
                  },//确定按钮执行的方法
                });
              })*/.on('click','img',function () {
                var imgSrc=$(this).attr('src');
                var imgText=$(this).siblings('.imgText').text();
                $('#pig_img').show();
                $('#pig_img').children('img').attr('src',imgSrc);
                $('#pig_img').children('.pig_img_text').text(imgText);
                $('#pig_img>img').css({
                  transform:'rotate(0deg)',
                });
                img.fuyuan();
                deg=0;
              })
              $('#pig_img').on('click','span',function () {
                $('#pig_img').hide();
              })


//    操作区域的按钮
              $('.hsm_r_operation').on('click','.TurnLeft',function () {
                //左旋转按钮
                deg=deg+90;
                //如果没有选中图片那么则不操作给出提示
                if($('#pig_img').is(':hidden')){
                  modalText("没有选中的图片");
                  return false;
                }else {
                  $('#pig_img>img').css({
                    transform:'rotate('+deg+'deg)',
                  })
                  if((deg/90)%2!=0){
                    img.xuanzhuan();
                  }else {
                    img.fuyuan();
                  }
                }
              }).on('click','.TurnRight',function () {
                //右旋转按钮
                deg=deg-90;
                //如果没有选中图片那么则不操作给出提示
                if($('#pig_img').is(':hidden')){
                  modalText("没有选中的图片");
                  return false;
                }else {
                  $('#pig_img>img').css({
                    transform:'rotate('+deg+'deg)',
                  })

                  if((deg/90)%2!=0){
                    img.xuanzhuan();
                  }else {
                    img.fuyuan();
                  }
                }

              })

              //点击放大按钮的时候
              $('.amplification').click(function () {
                //如果没有选中图片那么则不操作给出提示
                if($('#pig_img').is(':hidden')){
                  modalText("没有选中的图片");
                  return false;
                }else {
                  xzjg();
                  max(imgWidth,imgHeight);
                }
              });

              //缩小按钮
              $('.narrow').click(function () {
                //如果没有选中图片那么则不操作给出提示
                if($('#pig_img').is(':hidden')){
                  modalText("没有选中的图片");
                  return false;
                }else {
                  xzjg();
                  min(imgWidth,imgHeight);
                }
              });

              /*//滚轮事件
              var scrollFunc=function(e){
                e=e || window.event;
                if(e.wheelDelta){//IE/Opera/Chrome
                  if($('#pig_img').css('display')=='block'){
                    if(e.wheelDelta==120){
                      xzjg();
                      max(imgWidth,imgHeight);
                    }else {
                      xzjg();
                      min(imgWidth,imgHeight);
                    }
                  }
                  return false;
                }else if(e.detail){//Firefox

                }
              }

              /!*注册事件*!/
              if(document.addEventListener){
                document.addEventListener('DOMMouseScroll',scrollFunc,false);
              }//W3C
              window.onmousewheel=document.onmousewheel=scrollFunc;//IE/Opera/Chrome*/
            },
          }
          imaP.init();
        })(jQuery)

      },
      filters:{
        cut8(str){
          // console.log(str);
          str=str+'';
          if(str.length>8) {
            str = str.substring(0, 8);
            str = str + '...';
          }
          // console.log(str);
          return str;
        },
        cut4(str){
          // console.log(str);
          str=str+'';
          if(str.length>4) {
            str = str.substring(0, 4);
            str = str + '...';
          }
          // console.log(str);
          return str;
        },
        urlfilter (url) {
          url = window.localStorage.staticUrl + url;
          return url
        }
      }
    }
</script>

<style scoped>
  /*内容*/
  .ris_cont{
    /*border: 1px solid red;*/
    min-height: 500px;
    overflow: auto;
    min-width: 1300px;
    width: 96%;
    margin: 0 auto 40px;
    background-color: #fff;
  }
  .ris_cont_head{
    height: 26px;
    width: 96%;
    background-color: #e5e5e5;
    color: #3f3f3f;
    line-height: 26px;
    margin-top: 50px;
    min-width: 1300px;
    padding: 0 2%;
  }
  .ris_cont_head_left{
    float: left;
    width: 40%;
  }
  .ris_cont_head_left p{
    display: inline-block;
    padding:0 30px;
  }
  .ris_cont_head_right{
    float: right;
    width: 40%;
    text-align: right;
  }
  .ris_cont_head_right p{
    display: inline-block;
    padding:0 30px;
  }



  /*左边*/
  .reg_left{
    width: 40%;
    float: left;
    border: 1px solid #eee;
  }
  .ref_left_top{
    width: 100%;
    height: 36px;
    position: relative;
  }
  .ref_left_top p{
    position: absolute;
    height: 2px;
    width: 86%;
    top: 17px;
    left: 7%;
    z-index: 1;
    background: #57c8e6;
  }
  .ref_left_top span{
    display: inline-block;
    background: #fff;
    padding: 0 20px;
    line-height: 36px;
    z-index: 2;
    position: absolute;
    font-size: 16px;
    left: 43%;
    top: 0%;
    font-weight: bold;
  }

  /*table页*/
  .reg_tablePage{
    width: 90%;
    height: 34px;
    line-height: 34px;
    margin-left: 5%;
  }
  .reg_tablePage li{
    width: 48%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border-bottom: 2px solid #ff8500;
    margin: 0 1%;
    position: relative;
  }
  .table_page>li img{
    display: none;
    width: 14px;
  }
  .table_page>li.table_page_active>img{
    display: block;
    position: absolute;
    left: 47%;
    top: 34px;
  }
  /*搜索栏*/
  .reg_search{
    width: 90%;
    margin: 10px auto 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
  }
  .reg_search input[type=date]{
    width: 100%;
  }
  .reg_search_table1{
    width: 100%;
  }
  .reg_search_table1 tr td{
    height: 36px;
    position: relative;
  }
  .reg_search_table1 tr td:nth-child(1){width: 14%;}
  .reg_search_table1 tr td:nth-child(2){width: 38%;}
  .reg_search_table1 tr td:nth-child(3){width: 10%;text-align: center}
  .reg_search_table1 tr td:nth-child(4){width: 38%;}

  .reg_search_select1{
    width: 30%;
  }
  .reg_search_input1{
    width: 65%;
    float: right;
    padding-right: 32px;
  }
  .reg_search_table1 tr td input,.reg_search_table1 tr td select{
    border: 1px solid #88ada6;
    color: #587770;
  }
  .fdj_search{
    position: absolute;
    right: 8px;
    bottom: 10px;
    width: 16px;
    border-left: 1px solid #88ada6;
    padding-left: 5px;
  }
  /*table列表*/
  .reg_table_cont tr{
    border-bottom: 1px solid #ddd;
  }
  .reg_table_cont th{
    background: #b1b1b1;
    color: #fff;
  }
  .reg_table_cont_html{
    height: 430px;
    overflow: auto;
  }
  .reg_table_cont_html tr{
    border-bottom: 1px solid #ddd;
  }
  .reg_table_cont tr th:nth-child(1),.reg_table_cont_html tr td:nth-child(1){width: 30%;}
  .reg_table_cont tr th:nth-child(2),.reg_table_cont_html tr td:nth-child(2){width: 15%}
  .reg_table_cont tr th:nth-child(3),.reg_table_cont_html tr td:nth-child(3){width: 15%}
  .reg_table_cont tr th:nth-child(4),.reg_table_cont_html tr td:nth-child(4){width: 10%}
  .reg_table_cont tr th:nth-child(5),.reg_table_cont_html tr td:nth-child(5){width: 18%}
  .reg_table_cont tr th:nth-child(6),.reg_table_cont_html tr td:nth-child(6){width: 12%}
  .reg_table_cont_html tr td:nth-child(1){
    text-align: left;padding: 0 10px;box-sizing: border-box;
  }


  /*右边*/
  .reg_right{
    width: 57%;
    float: right;
    /*border: 1px solid #fa0002;*/
    margin: 15px 0 0 0;
  }
  .reg_right_head{
    background: #d7dbe6;
    line-height: 34px;
    font-size: 16px;
    font-weight: bold;
    box-sizing: border-box;
    padding-left: 30px;
    -webkit-box-sizing: border-box;
    position: relative;
  }
  .reg_right_head>span{
    position: absolute;
    right: 0;
    min-width: 200px;
    font-weight: 100;
    color: #666;
    font-size: 14px;
    padding-right: 20px;
  }

  .reg_right_list{
    width: 100%;
  }
  .reg_right_list_table{
    width: 98%;
    border-bottom: 1px solid #ddd;
  }
  .reg_right_list_table tr td:nth-child(1){width: 11%;}
  .reg_right_list_table tr td:nth-child(2){width: 22.33%;}
  .reg_right_list_table tr td:nth-child(3){width: 11%;}
  .reg_right_list_table tr td:nth-child(4){width: 22.33%;}
  .reg_right_list_table tr td:nth-child(5){width: 11%;}
  .reg_right_list_table tr td:nth-child(6){width: 22.33%;}
  .reg_right_list_table tr td:nth-child(odd){
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding: 0 10px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_right_list_table tr td input,.reg_right_list_table tr td select{
    width: 100%;
    display: block;
  }
  .reg_right_list_table tr td input.reg_right_list_boxInput{
    width: 70%;
    float: left;
  }
  .reg_right_list_table tr td select.reg_right_list_boxSelect{
    width: 30%;
    float: left;
  }
  .reg_right_list_table2 input,.reg_right_list_table2 select{
    border: 1px solid #88ada5;
    color: #42544e;
  }
  /*.reg_right_list_table3 input,.reg_right_list_table3 select,.reg_right_list_table3 textarea{*/
    /*border: 1px solid #4c8dad;*/
    /*color: #42544e;*/
    /*width: 100%;*/
  /*}*/
  /*.reg_right_list_table3 textarea{*/
    /*height: 26px;*/
  /*}*/
  .reg_right_list_table3 tr td:nth-child(1){width: 11% !important;}
  .reg_right_list_table3 tr td:nth-child(2){width: 89% !important;}

  .reg_r_t_list3{
    width: 100%;
    padding-top: 10px;
  }
  .reg_r_t_list3>li{
    float: left;
    display: inline-block;
  }
  .reg_r_t_list3>li:nth-child(1){
    width: 8%;
    padding: 0 10px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_r_t_list3>li:nth-child(2){width: 25%;}
  .reg_r_t_list3>li:nth-child(3){
    width: 8%;
    padding: 0 15px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_r_t_list3>li:nth-child(4){width: 25%;}
  .reg_r_t_list3>li>ul{
    width: 100%;
    border: 1px solid #4c8caf;
    border-radius: 5px;
    /*height: 60px;*/
    overflow: auto;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
  }
  .reg_r_t_list3>li>ul>li{
    /*padding:2px 5px ;*/
    line-height: 30px;
    border-bottom: 1px solid #eee;
    padding: 0 20px 0 5px;
    position: relative;
  }
  .reg_r_t_list_findClose{
    position: absolute;
    right: 0;
    top: 0;
    font-size: 14px;
    cursor: pointer;
    padding: 0 15px;
    color: #fa0002;
  }

  /*按钮*/
  .reg_right_btn{
    width: 100%;
    text-align: right;
    /*padding-top: 10px;*/
    position: relative;
  }
  .reg_right_btn>button{
    width: 150px;
    height: 30px;
    border: 0;
  }
  .reg_r_btn_modal{
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(0,0,0,.5);*/
    z-index: 3000;
    display: none;
  }
  .reg_r_btn_modal_cont{
    position: absolute;
    right: 0px;
    bottom: 30px;
    /*width: 800px;
    height: 470px;*/
    background: #fff;
    z-index: 3001;
    text-align: left;
    width: 0;
    height: 0;
    overflow: hidden;
    border: 1px solid #eee;
    opacity: 0;
  }


  /*右下底部按钮*/
  .reg_right_footBtn{
    text-align: right;
    margin-top: 5px;
  }
  .reg_right_footBtn button{
    border: 0;
    margin-right: 20px;
    position: relative;
    width: 110px;
    height: 30px;
  }
  .reg_right_footBtn button.btn_dyzyd{
    width: 150px;
  }
  .reg_right_footBtn button p{
    display: inline-block;
  }
  .reg_right_footBtn button img{
    height: 16px;
    position: absolute;
    right: 20px;
    top: 7px;
  }
  .reg_modal_head{
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    height: 40px;
    border-radius: 10px 10px 0 0;
  }
  .reg_modal_head>div{
    float: left;
    width: 50%;
    padding-left: 20px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    background: #727272;
    border-radius: 10px 10px 0 0;
  }
  .reg_modal_head>div:nth-child(1){
    border-right:1px solid #eee;
  }
  .reg_table_modalBox{
    width: 100%;
    height: 380px;
  }
  .reg_table_modalBox_left{
    width: 50%;
    float: left;
    border-right: 1px solid #ddd;
    height: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #ddd;
  }

  .reg_table_modalBox_left>ul,.reg_table_modalBox_right>ul{
    width: 100%;
    margin: 0 auto;
    height: 275px;
    border: 1px solid #eee;
    overflow: auto;
    box-sizing: border-box;
    line-height: 30px;
  }
  .reg_table_modalBox_left>ul>li>a,.reg_table_modalBox_right>ul>li>a{
    background: #999;
    color: #fff;
  }
  .reg_table_modalBox_left>ul>li a,.reg_table_modalBox_right>ul>li a{
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
    cursor: pointer;
  }
  .reg_table_modalBox_left>ul>li a.disabled,.reg_table_modalBox_right>ul>li a.disabled{
    background: #f3f3f3 !important;
    cursor: inherit;
  }


  .reg_table_modalBox_right{
    width: 50%;
    float: left;
    border-bottom: 1px solid #ddd;
    height: 100%;
    box-sizing: border-box;
  }

  .reg_table_modalBox_foot{
    width: 100%;
    height: 70px;
    /*border: 1px solid red;*/
  }
  .reg_table_modalBox_foot>input{
    width: 100%;
    height: 30px;
    margin: 2.5px 0;
  }
  .reg_table_modalBox_foot>div{
    width: 100%;
    height: 62px;
    overflow: auto;
    /*border: 1px solid red;*/
  }
  .reg_table_modalBox_foot>div button{
    display: inline-block;
    float: left;
    margin: 5px 3px 0;
    background: #4f90c2;
    color: #fff;
    border-radius: 5px;
    height: 26px;
    padding: 2px 10px;
    border: 0;
    position: relative;
  }
  .reg_table_modalBox_foot>div button>span{
    position: absolute;
    right: -4px;
    top: -4px;
    width: 16px;
    height: 16px;
    background: #fa5956;
    color: #fff;
    border-radius: 8px;
    line-height: 16px;
    cursor: pointer;
  }
  .reg_table_modalBox_foot>div button>span:hover{
    background: #fa1f1c;
  }





  .reg_r_btn_modal_c_fontBtn{
    text-align: right;
  }
  .reg_r_btn_modal_c_fontBtn button{
    border-radius: 5px;
    margin-right: 40px;
    margin-top: 10px;
  }
	input.input_width70{
		width: 55% !important;
		float: left;
		display: block;
	}
	input.input_width30{
		width: 45% !important;
		float: left;
		display: block;
	}
  ul.top1{
    position: absolute;
    left: -100% !important;
    bottom: 0 !important;
    border: 1px solid #4c8caf;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    height: 240px;
    overflow: auto;
    z-index: 1;
    background-color: #fff;
    /*display: none;*/
  }
  .reg_r_t_list3>li>ul{
    height: 160px;
  }
  /*.drop_down_menu>ul li{*/
    /*padding: 0 0 !important;*/
  /*}*/
  .drop_down_menuUl1 .drop_down_menu>ul li{
    text-align: left !important;

  }
  .drop_down_menuUl1_ul li{
    padding:0 10px;
  }
  .drop_down_menuUl2_ul li{
    padding: 0 10px;
  }
  .drop_down_menuUl1>li{
    padding: 0 30px 0 10px;
  }

/*

  !*八、 input输入带下拉和检索*!
  .drop_down_menu3{
    display: inline-block;
    width: 100%;
    height: 32px;
    position: relative;
  }
  .drop_down_menu3>input{
    width: 100%;
    height: 100%;
  }
  .drop_down_menu3>ul{
    position: absolute;
    left: 0;
    !*top: 32px;*!
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    height: 240px;
    overflow: auto;
    z-index: 1;
    background-color: #fff;
    !*display: none;*!
  }
  .drop_down_menu3>ul li{
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    line-height: 32px;
    cursor: pointer;
  }
  .drop_down_menu3>ul.top{
    bottom: 32px;
  }
  !*八、 input输入带下拉和检索*!
  .drop_down_menu4{
    display: inline-block;
    width: 100%;
    height: 32px;
    position: relative;
  }
  .drop_down_menu4>input{
    width: 100%;
    height: 100%;
  }
  .drop_down_menu4>ul{
    position: absolute;
    left: 0;
    !*top: 32px;*!
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    height: 240px;
    overflow: auto;
    z-index: 1;
    background-color: #fff;
    !*display: none;*!
  }
  .drop_down_menu4>ul>li>ul>li{
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    line-height: 32px;
    cursor: pointer;
  }
  .drop_down_menu4>ul.top{
    bottom: 32px;
  }
*/
  .drop_down_menu li{
    position: relative;
  }
  .drop_down_menu li>img{
    position: absolute;
    right: 0px;
    padding: 0 15px;
    width: 8px;
    top: 7px;
  }
  .drop_down_menu{
    position: relative;
  }
  .drop_down_menu .menu_button{
    position: absolute;
    right: 1px;
    top: 1px;
    padding: 5px 20px;
    border: 1px solid #eee;
    background: #00a6c8;
    color: #fff;
    cursor: pointer;
    border-radius: 3px;
  }
  .drop_down_menu .menu_button:hover{
    opacity: .8;
  }


  .booth {
    width:96%;
    /*background:#ccc;*/
    /*border: 10px solid #ddd;*/
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    height: 100%;
  }
  #video{
    width: 100%;
    margin: -2px 0px;
    height: 100%;
  }
  #tack{
    position: absolute;
    right: 20px;
    bottom: 52px;
    padding: 5px 15px;
    opacity: 0.7;
    border: 1px solid #ddd;
  }
  #tack:hover{
    opacity: 1;
  }
  canvas,video{
    /*border: 1px solid red;*/
  }
  #canvas{
    display: none;
  }
  /*大图*/
  #pig_img{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /*border: 1px solid red;*/
    box-sizing: border-box;
    background: #fff;
    display: none;
    overflow: hidden;
  }
  #pig_img>img{
    position: absolute;
    width: 610px;
    height: 480px;
    left: 50%;
    top: 50%;
    margin-left: -305px;
    margin-top: -240px;
    transform: rotate(0deg);
  }
  #pig_img>p{
    position: absolute;
    left: 10px;
    top: 20px;
    color: #6a4141;
    font-size: 14px;
  }
  #pig_img>span{
    position: absolute;
    right: 10px;
    top: 20px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 15px;
    border:1px solid #fa0002;
    color: #fa0002;
    opacity: 0.8;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
  }
  #pig_img>span:hover{
    opacity: 1;
  }

  .high_shot_meter{
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.4);
    z-index: 900;
  }
  .high_shot_meter>div{
    width: 860px;
    height: 480px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -430px;
    margin-top: -240px;
    background: #fff;
  }
  .hsm_title{
    position: absolute;
    left: 0;
    top: -32px;
    height: 32px;
    line-height: 32px;
    width: 100%;
    background: #353948;
    color: #fff;
    padding-left: 20px;
    font-size: 14px;
    font-weight: bold;
    box-sizing: border-box;
  }
  .hsm_left{
    width: 20%;
    height: 100%;
    float: left;
    border-right: 1px solid #aaa;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
  }
  .hsm_left img{
    width: 100%;
    height: 100px;
  }
  .hsm_left p{
    font-size: 14px;
    padding: 5px 0;
  }
  .hsm_left>ul{
    height: 100%;
    overflow: auto;
    padding-left: 10px;
    padding-right: 20px;
    -webkit-box-sizing: border-box;
  }

  /*右边拍照操作地区*/
  .hsm_right{
    width: 80%;
    float: right;
    height: 100%;
  }
  .hsm_r_img{
    width: 90%;
    float: left;
    height: 100%;
    box-sizing: border-box;
    /*border: 1px solid red;*/
  }
  .hsm_r_operation{
    width: 10%;
    height: 100%;
    float: right;
    box-sizing: border-box;
    border: 1px solid #999;
  }
  .hsm_r_operation button{
    width: 100%;
    cursor: pointer;
    height: 40px;
    border: 0;
    border-bottom: 1px solid #aaa;
    background: #999;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
  }
  .hsm_r_operation button:hover{
    opacity: 0.9;
  }

  /*左边的图片处理*/
  #hsm_imgList>li{
    position: relative;
  }
  #hsm_imgList>li img{
    cursor: pointer ;
  }
  #hsm_imgList>li>span{
    position: absolute;
    right: 10px;
    line-height: 20px;
    top: 7px;
    border: 1px solid #fa2b24;
    color: #fa706d;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    display: none;
    opacity: 0.6;
  }
  #hsm_imgList>li>span:hover{
    opacity: 1;
  }


  .pig_img_icon{
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  .hsm_title>span{
    position: absolute;
    right: 0;
    top: 0;
    padding: 0 20px;
    color: #fff;
    font-size: 20px;
    font-weight: 100;
    cursor: pointer;
  }

  .color_red{
    font-size: 16px;
    font-weight: bold;
    position: relative;
    top: 5px;
  }

</style>
